package com.qishi.exampleFour;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestGreetingAdvisor {

    public static void main(String[] args) {
        String configPath = "example4-1.xml";
        ApplicationContext ctx = new ClassPathXmlApplicationContext(configPath);
        Waiter waiter = (Waiter)ctx.getBean("waiter");
        Seller seller = (Seller)ctx.getBean("seller");


        waiter.greetTo("John");

        waiter.serviceTo("John");

        seller.greetTo("John");
    }
}
